package net.linlan.plat.mbiz.annotation;

import java.io.Serializable;

/**
 *
 * Filename IValidViewBusiness, 视图域的验证接口定义类
 * 包含更新、删除等处理等通用方法
 * @author Linlan
 * CreateTime 2023-08-09 09:17:56
 * @version 1.0
 * @since 1.0
 *
 */
public interface IValidViewBusiness {

    /** valid update status. 检查数据是否能够被更新，处理联动同步更新和关联信息.
     * @param id the input id
     * @return true can update
     *         false cannot update
     */
    boolean isValidUpdateSuccess(Serializable id);

    /** do update relation op. 执行更新关联操作.
     * @param id the input id
     */
    void doUpdateRelation(Serializable id);

    /** valid delete status. 检查数据是否能够被删除，默认为true, 逻辑删除、关联删除、物理删除等逻辑处理
     * @param id the input id
     * @return true can be deleted
     *         false cannot be deleted
     */
    boolean isValidDeleteSuccess(Serializable id);

    /** do delete relation op. 执行删除关联操作.
     * @param id the input id
     */
    void doDeleteRelation(Serializable id);

}
